package java20241112;

public class seven {
    public String name;
    public String gender;
    public int age;
    public static String classRoom;

    public seven() {
        System.out.println("I am huwei!");//最后执行不带参数的构造方法
    }

    {
        this.name = "huwei";
        this.gender = "女";
        this.age = 18;
        System.out.println("I am 666!");
    }//在执行构造块

    static {
        classRoom = "bit306";
        System.out.println("classRoom");
    }

    public void show() {
        System.out.println("name:" + name + " " + "gender:" + gender + " " + "age:" + " " + age);
    }

    public static void main(String[] args) {//先执行静态代码块
        seven v = new seven();
        v.show();

    }
}
